import mock from 'mockjs'
const logout = mock.mock(
  'logout',
  'post',
  options => {
    const {
      token
    } = JSON.parse(options.body)
    let success = 'false'
    let errorMsg = ''
    if (token !== '123456789') {
      success = 'false'
    } else {
      success = 'true'
    }
    if (!success) {
      return {
        success,
        errorMsg
      }
    } else {
      return {
        success
      }
    }
  }
)

export default logout
